package com.projet.erp;

import java.io.Closeable;

public class CloseUtil {
    public static void deal(Closeable... closeables) {
        if (closeables != null) {
            for (Closeable closeable : closeables) {
                try {
                    if (closeable != null) {
                        closeable.close();
                    }
                } catch (Exception ex) {

                }
            }
        }
    }

    public static void deal(AutoCloseable... closeables) {
        if (closeables != null) {
            for (AutoCloseable closeable : closeables) {
                try {
                    if (closeable != null) {
                        closeable.close();
                    }
                } catch (Exception ex) {

                }
            }
        }
    }


}
